#ifndef BASE_DEVICE_CONFIG_WRAPPER_H
#define BASE_DEVICE_CONFIG_WRAPPER_H

#ifdef _MSC_VER
#define DLL_EXPORT __declspec(dllexport)
#else
#define DLL_EXPORT
#endif

#include <vector>

namespace libdaq {
namespace device {

enum class LockzhinerADCVoltage {
    ADCVoltage_None = -1,
    ADCVoltage_0_1_V = 0,
    ADCVoltage_0_2_V = 1,
    ADCVoltage_0_5_V = 2,
    ADCVoltage_1_V = 3,
    ADCVoltage_2_V = 4,
    ADCVoltage_2_5_V = 5,
    ADCVoltage_5_V = 6,
    ADCVoltage_10_V = 7,
    ADCVoltage_15_V = 8,
    ADCVoltage_20_V = 9,
    ADCVoltage_50_V = 10,
    ADCVoltage_60_V = 11,
    ADCVoltage_100_V = 12
};

enum class LockzhinerADCSampleRate {
    ADCSampleRate_None = 0,
    ADCSampleRate_10 = 10,
    ADCSampleRate_100 = 100,
    ADCSampleRate_200 = 200,
    ADCSampleRate_500 = 500,
    ADCSampleRate_1_K = 1000,
    ADCSampleRate_2_K = 2000,
    ADCSampleRate_5_K = 5000,
    ADCSampleRate_10_K = 10000,
    ADCSampleRate_20_K = 20000,
    ADCSampleRate_50_K = 50000,
    ADCSampleRate_100_K = 100000,
    ADCSampleRate_200_K = 200000,
    ADCSampleRate_500_K = 500000,
    ADCSampleRate_800_K = 800000,
    ADCSampleRate_1_M = 1000000,
    ADCSampleRate_2_M = 2000000,
    ADCSampleRate_5_M = 5000000,
    ADCSampleRate_10_M = 10000000,
    ADCSampleRate_25_M = 25000000,
    ADCSampleRate_50_M = 50000000,
    ADCSampleRate_65_M = 65000000,
    ADCSampleRate_100_M = 100000000,
    ADCSampleRate_125_M = 125000000,
    ADCSampleRate_250_M = 250000000,
};

enum LockzhinerADCChannel {
    ADCChannelAINNone = 0b00000000,
    ADCChannelAIN1 = 0b00000001,
    ADCChannelAIN2 = 0b00000001 << 1,
    ADCChannelAIN3 = 0b00000001 << 2,
    ADCChannelAIN4 = 0b00000001 << 3,
    ADCChannelAIN5 = 0b00000001 << 4,
    ADCChannelAIN6 = 0b00000001 << 5,
    ADCChannelAIN7 = 0b00000001 << 6,
    ADCChannelAIN8 = 0b00000001 << 7,
};

enum class LockzhinerADCTriggerType {
    Normal = 0x00,
    RisingEdge = 0x01,
    FallingEdge = 0x02,
    DoubleEdge = 0x03,
    ExternalTrigger = 0x04,
    Error = 0x05,
};

enum class LockzhinerADCTriggerMode {
    Automatic = 0x00,
    Common = 0x01,
    Single = 0x02,
    Error = 0x04,
};

// 导出给C#使用的函数
extern "C" {
    DLL_EXPORT const char* GetADCVoltageName(LockzhinerADCVoltage voltage);
    DLL_EXPORT const char* GetADCSampleRateName(LockzhinerADCSampleRate sampleRate);
    DLL_EXPORT const char* GetADCChannelName(LockzhinerADCChannel channel);
    DLL_EXPORT const char* GetADCTriggerTypeName(LockzhinerADCTriggerType triggerType);
    DLL_EXPORT const char* GetADCTriggerModeName(LockzhinerADCTriggerMode triggerMode);
}

} // namespace device
} // namespace libdaq

#endif // BASE_DEVICE_CONFIG_WRAPPER_H 